import React, { memo } from 'react'
import { useState } from 'react';
import { useEffect } from 'react';

const Icketang = memo((props) => {
  const [user,setUser] = useState(123)
  const {username,children} = props;
  useEffect(()=>{
    // console.log("props",username,children);
    setUser(username)
  },[username])
  // children: user => {…}
  // username: "雨夜清荷"
  return (
    <div>
      <h2>Icketang</h2>
      {children(user)}
    </div>
    
  )
})


export default Icketang